This invention relates to a microprocessor-based, controller with embedded software, which provides automatic system control of an advanced multi-stage, variable-capacity heat pump system. The controller of this invention provides diagnostic, service and information functions for both heat pumps with compressors driven by electric motors and engines.